followNodeMatrixManipulator Class Reference

#include <Camera.h>

List of all members.

Public Member Functions

 followNodeMatrixManipulator (transformAccumulator *ta)
bool handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &aa)
void updateTheMatrix ()
virtual void setByMatrix (const osg::Matrixd &mat)
virtual void setByInverseMatrix (const osg::Matrixd &mat)
virtual osg::Matrixd getInverseMatrix () const
virtual osg::Matrixd getMatrix () const

Protected Member Functions

 ~followNodeMatrixManipulator ()

Protected Attributes

transformAccumulator * worldCoordinatesOfNode
osg::Matrixd theMatrix


Detailed Description

followNodeMatrixManipulator class uses the matrix representing the world coordinates of a node in the scene for positioning the camera. The camera follows a vehicle object and takes its PAT values for its position.

Definition at line 73 of file Camera.h.


Constructor & Destructor Documentation

followNodeMatrixManipulator::followNodeMatrixManipulator (  transformAccumulator *  ta  )  [inline]
 

Definition at line 76 of file Camera.h.

References theMatrix, and worldCoordinatesOfNode.

followNodeMatrixManipulator::~followNodeMatrixManipulator (   )  [inline, protected]
 

destructor of the followNodeMatrixManipulator class.

Definition at line 117 of file Camera.h.


Member Function Documentation

osg::Matrixd followNodeMatrixManipulator::getInverseMatrix (   )  const [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Returns:
The inverse of the theMatrix is returned.

Definition at line 78 of file Camera.cpp.

References theMatrix.

osg::Matrixd followNodeMatrixManipulator::getMatrix (   )  const [virtual]
 

is the virtual function of osgGA::MatrixManipulator base class.

Returns:
The theMatrix is returned.

Definition at line 89 of file Camera.cpp.

References theMatrix.

bool followNodeMatrixManipulator::handle (  const osgGA::GUIEventAdapter &  ea,
osgGA::GUIActionAdapter &  aa
) 
 

handle function checks for selected GUI events and responds to them. For our class, the only GUI event we need to respond to is the 'FRAME' event. At every frame event we need to set our copy of the matrix to be used to position the camera equal to the matrix that represents the transformAccumulator matrix

Definition at line 94 of file Camera.cpp.

References theMatrix, and updateTheMatrix().

void followNodeMatrixManipulator::setByInverseMatrix (  const osg::Matrixd &  mat  )  [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Parameters:
mat The inverse of the mat variable is set to the theMatrix field of the class

Definition at line 67 of file Camera.cpp.

References theMatrix.

void followNodeMatrixManipulator::setByMatrix (  const osg::Matrixd &  mat  )  [virtual]
 

the virtual function of osgGA::MatrixManipulator base class.

Parameters:
mat variable is set to the theMatrix field of the class

Definition at line 63 of file Camera.cpp.

References theMatrix.

void followNodeMatrixManipulator::updateTheMatrix (   ) 
 

a function changes the matrix for every FRAME callback

Definition at line 71 of file Camera.cpp.

References transformAccumulator::getMatrix(), theMatrix, and worldCoordinatesOfNode.

Referenced by handle().


Member Data Documentation

osg::Matrixd followNodeMatrixManipulator::theMatrix [protected]
 

a variable that keeps the matrix of the camera node.

Definition at line 126 of file Camera.h.

Referenced by followNodeMatrixManipulator(), getInverseMatrix(), getMatrix(), handle(), setByInverseMatrix(), setByMatrix(), and updateTheMatrix().

transformAccumulator* followNodeMatrixManipulator::worldCoordinatesOfNode [protected]
 

a variable that keeps the coordinates of the node that is going to be followed.

Definition at line 122 of file Camera.h.

Referenced by followNodeMatrixManipulator(), and updateTheMatrix().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:13 2006 for TraffEdu by  doxygen 1.4.6-NO